import { ApiProperty } from '@nestjs/swagger'
import { BaseDto, BaseErrorDto } from '../../apiProperty'

export const ErrorDto = BaseErrorDto

export class LoginResponseDto extends BaseDto {
  @ApiProperty({ example: '登录成功' })
  message: string

  @ApiProperty({ example: '/auth/login' })
  url: string

  @ApiProperty({ example: { token: '95fecbc552', id: 'f6b03a74961' } })
  data: unknown
}

export class RegisterResponseDto extends BaseDto {
  @ApiProperty({ example: '注册成功' })
  message: string

  @ApiProperty({ example: '/auth/register' })
  url: string

  @ApiProperty({ example: { username: 'admin', password: 'admin' } })
  data: unknown
}
